package com.qaml.mes.device.repository;

import com.qaml.mes.device.dao.CheckUpkeepUserDO;

import java.util.List;

/**
 * @ClassName CheckUpkeepUserRepository
 * @Description TODO
 * @Author leikai
 * @Date 2024/2/27 0027 9:52
 * @Version 1.0
 */
public interface CheckUpkeepUserRepository {

    /**
     * 通过检保项目编号删除对应的人员
     *
     * @param checkUpkeepId
     */
    void deleteByCheckUpkeepId(String checkUpkeepId);

    /**
     * 保存到数据库中
     *
     * @param checkUpkeepUserDOS
     */
    void saveBatch(List<CheckUpkeepUserDO> checkUpkeepUserDOS);


    void saveBatchByFor(List<CheckUpkeepUserDO> checkUpkeepUserDOS);

    /**
     * 通过检保项目编号查询对应的人员
     *
     * @param checkUpkeepId
     * @return
     */
    List<CheckUpkeepUserDO> getByCheckUpkeepId(String checkUpkeepId);

    /**
     * 通过检保项目编号和人员类型查询对应的人员
     *
     * @param checkUpkeepId
     * @param type
     * @return
     */
    List<CheckUpkeepUserDO> getByCheckUpkeepIdAndStatus(String checkUpkeepId, String type);


    List<CheckUpkeepUserDO> getByType(String userId, String type);

    /**
     * 批量查询检保人员
     *
     * @param checkUpkeepIds
     * @return
     */
    List<CheckUpkeepUserDO> getByCheckUpkeepIds(List<String> checkUpkeepIds, String type);

    /**
     * 批量查询检保人信息
     */

    List<CheckUpkeepUserDO> getCheckUserByCheckUpkeepIds(List<String> checkUpkeepIds, String type);

    /**
     * 获取所有的复核人员
     *
     * @return
     */
    List<CheckUpkeepUserDO> getRecheckUserList(String personType);


    /**
     * 根据 checkUpkeepIds批量删除人员
     *
     * @return
     */
    void updateCheckUpkeepUserByIds(List<String> ids);


    void updateHolidayTipByIds(List<String> ids);

    List<CheckUpkeepUserDO> getByCheckUpkeepIdAndStatusNoTenantId(String checkUpkeepId, String type);

    void updateDataByCheckUpkeepId(CheckUpkeepUserDO checkUpkeepUserDO);
}